﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Input.Touch;
using Microsoft.Xna.Framework.Media;

namespace GameWP
{
    public class DoctorZombie : BowZombie
    {
#region Initilation
        public DoctorZombie(List<Texture2D> listTextures,
            Vector2 posotion,
            Vector2 positionBullet,
            int hp,
            int damage,
            float speed,
            float zoneAttack,
            float delay,
            float scaleTexture,
            int price,
            SpriteEffects spriteEffect,
            List<List<int>> seqTexture)
           :base(listTextures, posotion, positionBullet, hp, damage, speed, zoneAttack, delay, scaleTexture, price, spriteEffect, seqTexture)
           
        {
            _listTextures = listTextures;
            _position = posotion;
            _positionBullet = positionBullet;
            _hp = hp; _hpmax = _hp;
            _damage = - damage; // khac biet vi no chi bom mau cho dong doi minh
            _speed = speed; _speedmax = _speed;
            _scaleRect = zoneAttack;
            _delay = delay;
            _price = price;
            _seqTexture = seqTexture;
            _rectangle = new Rectangle
                ((int)_position.X, (int)_position.Y, _listTextures[0].Width, _listTextures[0].Height);
            _scaleTexture = scaleTexture;
            _spriteEffect = spriteEffect;
            _indexTexture = 0;
            _state = State.Move;
            _preState = State.Unknow;
            _isDoctor = true;

            //HpBar
            _hpBar = new HpBar(_hp, new Vector2(_position.X + 200, _position.Y - 20), Color.Red);

            //Arrow
            _arrow = new Arrow(_listTextures[_listTextures.Count - 1], InitPositionArrow(), _speed, _spriteEffect, _scaleTexture);
        }    
#endregion

#region  Methods
        private Vector2 InitPositionArrow()
        {
            return new Vector2(_position.X, _positionBullet.Y);
        }

        public override bool IsCollisionWith(Sprite2D AnotherSprite)
        {
            return base.IsCollisionWith(AnotherSprite);
        }
        #endregion

#region Update & Draw
        public override void Update(GameTime gametime, Vector2 position)
        {
            base.Update(gametime, position);
        }

        public override void Draw(SpriteBatch spritebatch, GameTime gametime)
        {
            base.Draw(spritebatch, gametime);
        }
        #endregion
        
    }
}
